From a9c5bdf9a50ea3a0b30337e01265474ceba32f7f Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Wed, 15 Jul 2026 18:44:06 +0800 Subject: [PATCH] magnifier: Avoid applying monitor scaling factors to the cursor twice The mouse actor needs special consideration because it is not a child of the _uiGroupClone being magnified. So it gets magnified separately *and* already has its own scaling factor from the source actor (actually from the display scaling factor). Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/work_items/9302 Part-of: (cherry picked from commit b258fed0671d0f73a0308d42ab0af820dfab62cf) --- js/ui/magnifier.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index c6e3d49fc..9da1f7776 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -1792,11 +1792,12 @@ class ZoomRegion { }); const [mouseX, mouseY] = this._getMousePosition(); + const sourceMouseScale = this._mouseSourceActor.get_resource_scale(); this._mouseActor.ease({ x: mouseX, y: mouseY, - scale_x: this._xMagFactor, - scale_y: this._yMagFactor, + scale_x: this._xMagFactor / sourceMouseScale, + scale_y: this._yMagFactor / sourceMouseScale, mode: Clutter.AnimationMode.EASE_OUT_QUAD, duration: animate ? 100 : 0, }); -- 2.39.5